<?php 
function createNode($tree , $parent)
{
	 $s='';
	 if(!$tree->hasChilds($parent))
	 	return '';
	 	
	 $childs = $tree->getChilds($parent);
     foreach ($childs as $k=>$v){
         $s.='<div class="menuNode">
                 <div class="menuItem">
                 	<a href="'.Request::url(array($v['data']['code'])).'">'.$v['data']['menu_title'].'</a>
                 </div>';
           
         if($tree->hasChilds($v['id']))
               $s.=createNode($tree , $v['id']);
           
         $s.='</div>';
      } 
      return $s;     
}
?>
<div class="rounded blockItem">
	<div class="blockTitle"><?php echo $this->lang->MODULE_MENU; ?></div>
	<div class="blockContent">	
			<?php echo createNode($this->tree , 0);	?>
	</div>
</div>
<div class="sep"></div>